﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Models
{
    public class WorkflowInstance : EntityBase
    {
        public virtual Workflow Workflow { get; set; }
        public int? WorkflowID { get; set; }

        public int? ApplyMsgID { get; set; }
        public virtual ApplyMsg ApplyMsg { get; set; }

        public List<ActivityInstance> ActivityInstances { get; set; }

        public List<FieldInstance> FieldInstances { get; set; }
    }

    public class ActivityInstance : EntityBase
    {
        public virtual Employee Employee { get; set; }
        public int? EmployeeID { get; set; }

        public string ParticipantType { get; set; }

        public int? FromEmployeeID { get; set; }

        public virtual WorkflowInstance WorkflowInstance { get; set; }
        public int? WorkflowInstanceID { get; set; }

        public int? ActivityID { get; set; }
        public Activity Activity { get; set; }

        public string Result { get; set; }
        public string Comments { get; set; }

        public bool IsEnd { get; set; }
    }

    public class FieldInstance : EntityBase
    {
        public string FieldValue { get; set; }

        public virtual Field Field { get; set; }
        public int? FieldID { get; set; }

        public virtual WorkflowInstance WorkflowInstance { get; set; }
        public int? WorkflowInstanceID { get; set; }
    }

    public class Advisor : EntityBase
    {
        public int? ParticipantResultID { get; set; }
        public virtual Employee Employee { get; set; }
        public int? EmployeeID { get; set; }
        public string Comments { get; set; }
    }

     public class ApplyMsg : EntityBase
     {
         public int? ApplyerID { get; set; }
         public Employee Applyer { get; set; }

         public int? ProxyApplyerID { get; set; }
         public Employee ProxyApplyer { get; set; }

         public List<FieldInstance> FieldInstances { get; set; }
     }
}